<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@taglib prefix="s" uri="/struts-tags" %>
	<%@ taglib prefix='sec' uri='http://www.springframework.org/security/tags'%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<script type="text/javascript" src="scripts/boot.js"></script>
	<style type="text/css">
		.mini-tabs-header-left .mini-tabs-space2 div{
    		height: 5px;
		}
		html, body{
       		margin:0;padding:0;border:0;width:100%;height:100%;overflow:hidden;
    	}
	</style>
</head>
<body>
	<div id="tabs1" class="mini-tabs" activeIndex="0" style="width:100%; height:100%;padding: 5px;" plain="false" tabPosition="left" ontabload="tabload">
	    <sec:authorize url='/popup_call_manage_my_unt_customer.do'>
	    <div title="客户信息" url="call_manage_my_unt_customer.do" refreshOnClick="true" allowResize="false">
			<input class="mini-hidden" id="call_id" value="<s:property value='callId'/>"/>
			<input class="mini-hidden" id="call_status" value="<s:property value='callStatus'/>"/>
	    </div>
	    </sec:authorize>
	    <sec:authorize url='/popup_orders_init.do'>
	    <div title="订单信息" url="orders_init.do" name="cInfo" refreshOnClick="true" enabled="false">
	    	<input class="mini-hidden" id="customer_id"/>
	    	<input class="mini-hidden" id="customer_name"/>
	    </div>
	    </sec:authorize>
	    <sec:authorize url='/popup_contact_record_init.do'>
	    <div title="联系记录" url="contact_record_init.do" name="cInfo" refreshOnClick="true" enabled="false">
	    </div>
	    </sec:authorize>
	    <sec:authorize url='/popup_customer_call_records_init.do'>
	    <div title="通话记录" url="customer_call_records_init.do" refreshOnClick="true" enabled="false">
	    </div>
	    </sec:authorize>
	    <sec:authorize url='/popup_customer_remind.do'>
	    <div title="客户提醒" url="customer_remind.do" refreshOnClick="true" enabled="false">
	    </div>
	    </sec:authorize>
	    <sec:authorize url='/popup_customer_sms_init.do'>
	    <div title="发送短信" url="customer_sms_init.do" refreshOnClick="true" enabled="false" >
	    </div>
	    </sec:authorize>
	    <sec:authorize url='/popup_customer_health_init.do'>
	    <div title="健康档案" url="customer_health_init.do" refreshOnClick="true" enabled="false">
	    </div>
	    </sec:authorize>
	    <sec:authorize url='/popup_customer_recommend_init.do'>
	    <div title="推荐信息" url="customer_recommend_init.do" refreshOnClick="true" enabled="false">
	    </div>
	    </sec:authorize>
	</div>
</body>
</html>

<script type="text/javascript">
	mini.parse();
	
	var callId = mini.get("call_id");
	var callStatus = mini.get("call_status");
	var customerId = mini.get("customer_id");
	var customerName = mini.get("customer_name");
	var tabs = mini.get("tabs1");
	top["win"] = window;
	function setEnable(cId, cName, callTaskId){
	    for(var i=1; i<8; i++) {
	    	tabs.updateTab(i,{enabled:true});
	    }
	    customerId.setValue(cId);
	    customerName.setValue(cName);
	    callId.setValue(callTaskId);
	}
	
	// 将任务id传到客户信息页面
	function tabload(e) {
		var data = {
			id: callId.getValue(), 
			customerId: customerId.getValue(), 
			customerName: customerName.getValue(), 
			callStatus: callStatus.getValue(),
			openType: "play"					// 任务打开类型（处理打开、弹屏打开）
		}; 
		var iframe = this.getTabIFrameEl(e.tab);
	    iframe.contentWindow.SetData(data);
	}
</script>